#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int a, b, n;
    printf("size:");
    scanf("%d", &n);
    while (n > 0)
    {
        if (n == 1)
        {
            printf("*\n");
            printf("size:");
            scanf("%d", &n);
        }
        if (n >= 2)
        {
           for (int o = 1; o <= 2 * n - 1; o++)
                printf("*");
                printf("\n");
            for (int i = 1; i <= n - 2; i++)
            {
                for (int q = 1; q <= i; q++)
                    printf(" ");
                    printf("*");
                for (int t = 1; t <= 2 * (n - i - 1) - 1; t++)
                    printf(" ");
                    printf("*");
                    printf("\n");
            }
            for (int w = 1; w <= n - 1; w++)
                    printf(" ");
                    printf("*\n");
            for (int r = 1; r <= n - 2; r++)
            {
                for (int l = 1; l <= n - r - 1; l++)
                    printf(" ");
                    printf("*");
                for (int t = 1; t <= 2 * r - 1; t++)
                    printf(" ");
                    printf("*");
                    printf("\n");
            }
            for (int o = 1; o <= 2 * n - 1; o++)
                printf("*");
                printf("\n");
                printf("size:");
            scanf("%d", &n);
        }
    }
    printf("Bye!");
    return 0;
}